class plantInfom extends egret.Sprite{
    private _name:string = "";
    private _nEx:number = 0;//当前能量值
    private _mEx:number = 0;//最大能量值
    private _url:string = "";
    private _img:eui.Image = new eui.Image;
    private _Id:number;//土地索引
    private _growStage:string = "";
    private _plantId:number = 0;//种植表id
    private _indexId:number = 0;//种植索引
    private _rect:eui.Rect;
    public constructor(){
        super();
        this.init();
    }
    private init(){
        egret.ImageLoader.crossOrigin = "anonymous";
        this._img.source = this._url;
        this._img.width = 123;
        this._img.height = 150;
        this._img.y = -35;
        this._img.pixelHitTest = true; 
        this.addChild(this._img);
        this.anchorOffsetX = 61.5;
        this.anchorOffsetY = 75;
        this.width = 123;
        this.height = 150;
        this._rect = new eui.Rect;
        // this._rect.graphics.beginFill(0xffffff);
        // this._rect.graphics.endFill();
        this._rect.width = 99;
        this._rect.height = 60;
        this._rect.x = 12;
        this._rect.y = 45;
        this._rect.touchEnabled = true;
        this._rect.alpha = 0;
        this.addChild(this._rect);
    }
    public get Id():number{
        return this._Id;
    }
    public set Id(id:number){
        this._Id = id;
    }
    public get name():string{
        return this._name;
    }
    public set name(n:string){
        this._name = n; 
    }
    public get nEx():number{
        return this._nEx;
    }
    public set nEx(ex:number){
        this._nEx = ex;
    }
    public get mEx():number{
        return this._mEx;
    }
    public set mEx(ex:number){
        this._mEx = ex;
    }
    public get url():string{
        return this._url;
    }
    public set url(u:string){
        this._url = u;
        this._img.source = this._url;
    }
    public get growStage():string{
        return this._growStage;
    }
    public set growStage(u:string){
        this._growStage = u;
    }
    public get plantId():number{
        return this._plantId;
    }
    public set plantId(n:number){
        this._plantId = n;
    }
    public get index():number{
        return this._indexId;
    }
    public set index(n:number){
        this._indexId = n;
    }
}